using System;

namespace ERP_SaaS_WinForm.生产工单_报工_工序.Process
{
    /// <summary>
    /// 生产工单物料清单数据模型
    /// </summary>
    public class ProductionMaterial
    {
        /// <summary>
        /// 生产工单物料清单主键
        /// </summary>
        public int productionMaterialId { get; set; }

        /// <summary>
        /// 生产工单ID
        /// </summary>
        public int productionOrdersId { get; set; }

        /// <summary>
        /// 物料编号
        /// </summary>
        public string materialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string materialName { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string unit { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string specification { get; set; }

        /// <summary>
        /// 物料属性
        /// </summary>
        public bool attribute { get; set; }

        /// <summary>
        /// 库存上限
        /// </summary>
        public int inventorylimit { get; set; }

        /// <summary>
        /// 库存下限
        /// </summary>
        public int inventorylevel { get; set; }

        /// <summary>
        /// 当前库存
        /// </summary>
        public int currentInventory { get; set; }

        /// <summary>
        /// 仓库编号
        /// </summary>
        public string warehouseCode { get; set; }

        /// <summary>
        /// 采购价格
        /// </summary>
        public decimal purchasePrice { get; set; }

        /// <summary>
        /// 有效期
        /// </summary>
        public int periodOfValidity { get; set; }

        /// <summary>
        /// 物料状态
        /// </summary>
        public bool materialState { get; set; }

        /// <summary>
        /// 逻辑删除
        /// </summary>
        public bool isDel { get; set; }
    }

    /// <summary>
    /// 生产工单物料清单API响应
    /// </summary>
    public class ProductionMaterialApiResponse
    {
        public string message { get; set; }
        public int code { get; set; }
        public ProductionMaterial[] data { get; set; }
    }

    /// <summary>
    /// 添加生产工单物料请求模型
    /// </summary>
    public class AddProductionMaterialRequest
    {
        /// <summary>
        /// 生产工单ID
        /// </summary>
        public int productionOrdersId { get; set; }

        /// <summary>
        /// 物料编号
        /// </summary>
        public string materialCode { get; set; }
    }

    /// <summary>
    /// 添加生产工单物料请求包装
    /// </summary>
    public class AddProductionMaterialCommand
    {
        public AddProductionMaterialRequest[] items { get; set; }
    }

    /// <summary>
    /// 添加生产工单物料API响应
    /// </summary>
    public class AddProductionMaterialApiResponse
    {
        public string message { get; set; }
        public int code { get; set; }
        public bool data { get; set; }
    }

    /// <summary>
    /// 删除生产工单物料请求模型
    /// </summary>
    public class DelProductionMaterialCommand
    {
        /// <summary>
        /// 生产工单ID
        /// </summary>
        public int productionOrdersId { get; set; }

        /// <summary>
        /// 物料编号数组
        /// </summary>
        public string[] materialCodes { get; set; }
    }

    /// <summary>
    /// 删除生产工单物料API响应
    /// </summary>
    public class DelProductionMaterialApiResponse
    {
        public string message { get; set; }
        public int code { get; set; }
        public bool data { get; set; }
    }
}
